/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package neo.workforce.dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;
import neo.workforce.dao.Workspace;
import org.springframework.jdbc.core.RowMapper;

/**
 *
 * @author KTB_User
 */
public class WorkspaceRowMapper implements RowMapper {

    public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Workspace item = new Workspace();
        item.setId(rs.getInt("ID"));
        item.setSessionId(rs.getString("SESSION_ID"));
        item.setProcessId(rs.getLong("PROCESS_ID"));
        item.setActivityId(rs.getLong("ACTIVITY_ID"));
        item.setIncomming(new java.util.Date(rs.getDate("INCOMMING").getTime()));
        item.setOpenJob(new java.util.Date(rs.getDate("OPEN_JOB").getTime()));
        item.setCloseJob(new java.util.Date(rs.getDate("CLOSE_JOB").getTime()));
        return item;
    }
}
